<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let p = new Promise((resolve, rejected) => {
            resolve('success')
        })
        //一。成功之后的then的返还值，resolve之后then执行第一个函数onResolve
        let result =p.then(res => {
            return 'hello';
            return new Promise((resolve,rejected)=>{
                resolve("返回成功的promise")
                
            })

            // return new Promise((resolve,rejected)=>{
            //     rejected("返回失败的promise")
            // })
        }, err => {

        })
        console.log(result);
    </script>
</body>

</html>